import java.util.*;

import java.io.*;
public class Text2 {
    //第二题 : dd爱框框   算法 : 滑动窗口 双指针
    public static void main(String[] args) throws IOException {
        //滑动窗口  要用io流输入
        Read sc = new Read();
        int n = sc.nextInt();
        int x = sc.nextInt();
        int[] arr = new int[n+1];
        for(int i= 1; i<n+1; i++) {
            arr[i] = sc.nextInt();
        }

        int left = 1;
        int right = 1;
        int sum = 0;
        int suml = 0, sumr = 0,len = Integer.MAX_VALUE;
        while(right <= n) {
            sum += arr[right];  //进窗口
            while(sum >= x) {
                if(len > right - left +1) {
                    suml = left;
                    sumr = right;
                    len = right - left +1;
                }

                //出窗口
                sum -= arr[left];
                left++;
            }
            right++;
        }
        System.out.println(suml + " " + sumr);
    }
}
class Read {
    StringTokenizer st = new StringTokenizer("");
    BufferedReader bf = new BufferedReader(new InputStreamReader(System.in));

    String next() throws IOException {
        while(!st.hasMoreTokens()) {
            st = new StringTokenizer(bf.readLine());
        }
        return st.nextToken();
    }

    int nextInt() throws IOException {
        return Integer.parseInt(next());
    }
}